Issue #1316 msw model from imod5 data#1328
Merged
JoerivanEngelen merged 53 commits intoDec 12, 2024
Merged
Conversation
…msw_model_from_imod5_data
…msw_model_from_imod5_data
…nd prepare for adding ScalingFactors
…msw_model_from_imod5_data
Manangka
reviewed
Dec 10, 2024
| """ | ||
| extra_paths = imod5_data["extra"]["paths"] | ||
| path_to_parasim = find_in_file_list("para_sim.inp", extra_paths) | ||
| parasim_settings = read_para_sim(path_to_parasim) |
Collaborator
There was a problem hiding this comment.
What if path_to_parasim is empty? Should this be put in an if statement?
Contributor
Author
There was a problem hiding this comment.
All iMOD5 usecases contain this file in the "EXTRA" section in the projectfile: Without it they couldn't run their MetaSWAP model with iMOD5. If the para_sim.inp is missing an error will be thrown: "could not find para_sim.inp in list of paths: ..."
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.



Fixes #1316
Description
Adds
MetaSwapModel.from_imod5_data, currently only models can be written by turning off validation, that is still something to pick up.MetaSwapModel.from_imod5_dataImod5DataDictTypeAlias to TypedDict, with which we can avoid a lot of type casting.MetaSwapActivedataclass to store maskssettingsupon initialization, instead of only supporting default settings.validateargument toMetaSwapModel.writeto turn off model validation upon writing.Checklist
Issue #nr, e.g.Issue #737